#include <iostream>
using namespace std ;

int main (){
	int a,sum=0 ;
	cin >> a ;
	while (a != 0){
		if (1 == a % 2) sum++ ;
		a = a / 2 ;
	}
	cout << sum << endl ;
	return 0 ;
}
